// 引入
import Vue from 'vue'
import VueI18n from 'vue-i18n'
// 注册
Vue.use(VueI18n)
// 引入字典
// element
import elementEN from 'element-ui/lib/locale/lang/en'
import elementZH from 'element-ui/lib/locale/lang/zh-CN'

// 引入菜单语言包
import men from './en'
import mzh from './zh'
// 创建实例
export default new VueI18n({
  locale: localStorage.getItem('lang') || 'en',
  messages: {
    en: {
      morning: 'Good morning',
      work: 'Happy everyday',
      ...elementEN,
      ...men
    },
    zh: {
      morning: '早上好',
      work: '祝你开心每一天',
      ...elementZH,
      ...mzh
    }
  }
})
